﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Shared/default.master" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Pages_Index" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script language="javascript" src="../JS/jquery.jmpopups-0.5.1.js"></script>
<script language="javascript" src="../JS/vote.js"></script>
<style type="text/css">
body{
	background:#89b556 url(../App_Themes/Ftuan/images/bg.jpg) no-repeat -120px 140px; 
}
</style>
<script type="text/javascript">
    var types = 'yes';
    var pInterval = window.setInterval(products_refurbish, 60000);
$(document).ready(function(){
products_refurbish();
var cityname = '<%= Pan.Sys_Config.GetCurrentCityName()%>';
if (cityname == "杭州") {
  //  $('#ad').html("<img style='width:950px' src='../Content/Images/hangzhou.jpg' />").fadeTo(5000, 100).hide(5000);
}
else if (cityname == "贵阳") {
 //   $('#ad').html("<img style='width:950px' src='../Content/Images/guiyang.gif' />").fadeTo(10000, 1000).hide(5000);
}
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ObjectDataSource ID="odsProductInfo" runat="server" 
        OldValuesParameterFormatString="original_{0}" SelectMethod="GetIndexModel" 
        TypeName="Tuan.BLL.Products" onselected="odsProductInfo_Selected">
        <SelectParameters>
            <asp:QueryStringParameter Name="ProductID" QueryStringField="pid" Type="Int32" />
            <asp:CookieParameter CookieName="cityid" Name="cityid" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <div id="ad" style="margin-top:-15px;"></div>
<asp:DetailsView ID="dtvProductInfo"  EnableViewState="false" runat="server" DataSourceID="odsProductInfo" AutoGenerateRows="False">
    <Fields>
        <asp:TemplateField>
            <ItemTemplate>
    <div class="open5" id="wen" style='<%# string.IsNullOrEmpty(Eval("Remark").ToString())?"display:none":"display:block" %>'>
<div class="open5_top"></div>
<h1 style="display:none">5151团购网每天提供一单精品消费，为您精选餐厅、酒吧、KTV、SPA、美发店、瑜伽馆等特色商家，只要凑够最低团购人数就能享受无敌折扣。5151tuan.com</h1>
<div class="open5_cont"><h2> <%# string.IsNullOrEmpty(Eval("Remark").ToString()) ? "" : Eval("Remark")%> </h2><span>
<img id="Img1"  runat="server" src="~/app_themes/ftuan/images/close4.gif" onclick="close_wen()"/></span></div>
<div class="open5_bot"></div>
</div>
<div class="index_one_fx_big">
	<div class="index_one_fx">
		<h4>分享此产品：</h4>
		<ul><input name="msnqqtype" id="msnqqtype" type="hidden"  value="1" />
			<li class="msnqq" onclick="showmsnqq();" style="cursor:pointer">MSN/QQ</li>
			<li class="sina" onclick="shareFriend(23,'sina','<%# System.Web.HttpUtility.UrlEncode("http://5151tuan.com/pages/index.aspx?pid=")%><%#Eval("ProductID") %>','<%#  System.Web.HttpUtility.UrlEncode(Eval("ProductName").ToString()) %>')" style="cursor:pointer">微博</li>
			<li class="kaixin" onclick="shareFriend(23,'kaixin001','<%# System.Web.HttpUtility.UrlEncode("http://5151tuan.com/pages/index.aspx?pid=")%><%#Eval("ProductID") %>','<%# System.Web.HttpUtility.UrlEncode(Eval("ProductName").ToString()) %>')" style="cursor:pointer">开心</li>
			<li class="renren" onclick="shareFriend(23,'renren','<%# Eval("ProductID","http://www.5151tuan.com/pages/index.aspx?pid={0}") %>','<%# System.Web.HttpUtility.UrlEncode(Eval("ProductName").ToString()) %>')" style="cursor:pointer">人人</li>
			<li class="douban" onclick="shareFriend(23,'douban','<%# System.Web.HttpUtility.UrlEncode("http://5151tuan.com/pages/index.aspx?pid=")%><%#Eval("ProductID") %>','<%#  System.Web.HttpUtility.UrlEncode(Eval("ProductName").ToString()) %>')" style="cursor:pointer">豆瓣</li>
			
			<%--<li class="email" onclick="ShowSenMail(26,'<%# Eval("ProductName") %>');" style="cursor:pointer">Email</li>--%>
        </ul>
	</div>
	<div class="index_one_fx_zk" style="display:none" id="msnqq">
		<h4>您可以把下面的链接通过MSN/QQ发送给朋友</h4>
		<p><input name="msnqqvalue" id="msnqqvalue" type="text" class="index_input1" value='<%# Eval("ProductName","{0} http://5151tuan.com") %>' /><input name="提交" type="button" class="index_but1" value="复制" onclick="copy_code();"/></p>
	</div>
</div>
<input type="hidden" id="products_pid" value='<%# Eval("ProductID") %>'></input>
<input type="hidden" id="products_endDate" value='<%# Eval("EndDate") %>'></input>
<input type="hidden" id="products_minNum" value='<%# Eval("MinNumber") %>'></input>
<input type="hidden" id="products_maxNum" value='<%# Eval("MaxCount") %>'></input>
<div class="main_big">
	<div class="main_l_big">
		<div class="l_top3"></div>
		<div class="l_area_big">
			<h1 class="today"><%# Eval("ProductName") %></h1>
			<div class="index_top_left">
				<div class="index_one_l_left_cont1">
					<em><%# Eval("NowPrice").ToString().TrimEnd('0').TrimEnd('.') %> </em>
					<%# (DateTime.Parse(DateTime.Now.ToShortDateString()) >= Convert.ToDateTime(Eval("ShowDate")) && DateTime.Parse(DateTime.Now.ToShortDateString()) <= Convert.ToDateTime(Eval("EndDate").ToString())) ? string.Format("<span><a href=\"/Pages/buy/orderdetails.aspx?pid={0}\"><img src=\"/app_themes/ftuan/images/buy.gif\" alt=\"购买\" /></a></span>", Eval("ProductID")) : "<span><img src=\"/app_themes/ftuan/images/buyno.gif\" alt=\"产品已经下架，不能购买\" /></span>"%>					
							
				</div>
				<div class="index_one_l_left_cont2">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" class="index_one_l_left_cont2_tab">
					  <tr>
						<td height="25" align="center" valign="middle">原价</td>
						<td align="center" valign="middle">折扣</td>
						<td align="center" valign="middle">节省</td>
					  </tr>
				  <tr>
					<td height="25" align="center" valign="middle" class="index_one_l_left_cont2_t">
					<%# Eval("OldPrice", "{0:￥.0}").TrimEnd('0').TrimEnd('.')%> </td>
					<td align="center" valign="middle" class="index_one_l_left_cont2_t">
					<%# string.Format("{0:f1}折 ", (Convert.ToDecimal(Eval("NowPrice")) / Convert.ToDecimal(Eval("OldPrice"))) * 10).TrimEnd('0').TrimEnd('.')%></td>
					<td align="center" valign="middle" class="index_one_l_left_cont2_t">
					￥<%# string.Format("{0:f1}", Convert.ToDecimal(Eval("OldPrice")) - Convert.ToDecimal(Eval("NowPrice"))).TrimEnd('0').TrimEnd('.')%></td>
				  </tr>

					</table>	
				</div>
								<div id="sale_over" style="display:none;" class="index_one_l_left_cont7"><img src="/app_themes/ftuan/images/index_g2.gif" alt="已经售罄" /></div>
				<div id="sale_no"    class="index_one_l_left_cont3">
					<dl>    
						<dt>时间仅剩</dt>
						<dd><em id="RemainH">0</em>小时</dd>
						<dd><em id="RemainM">0</em>分</dd>
						<dd><em id="RemainS">0</em>秒</dd>
					</dl>
				</div>
                <div  id="products_type">
				<div class='index_one_l_left_cont6'><div class='index_one_l_left_cont6_t f14'></div>
				<div class='tipometer'><img src='/App_themes/ftuan/images/loading.gif'></div>
				<div class='index_one_l_left_cont6_b'></div></div>
				</div>
                <%--<div  id="products_type">
					<div class="index_one_l_left_cont6">
				<div class="index_one_l_left_cont6_t f14">641人已买</div>
				<div class="tipometer"><img src="../app_themes/ftuan/images/index_g1.gif" alt="已经成团" /></div>
    
                </div>
			</div>--%>
			<%--<div class="index_one_l_left_cont4" styl>
					<dl>
						<dt>快告诉朋友无敌折扣!</dt>
						<dd><a href="http://www.jiathis.com/share.html" class="jiathis"><img src="../app_themes/ftuan/images/fx1.gif"  /></a><script type="text/javascript" src="http://www.jiathis.com/code/jia.js" charset=utf-8></script></dd>
					</dl>
				</div>--%>
			</div>
			<div class="index_top_right">
				<p><img id="Shimg" src='<%# Eval("ShowImage") %>' runat="server" /></p>
				<ul>
					<li class="index_top_right_l">
						<dl>
							<dt>【产品描述】</dt>
							<dd><p>
							<%# Eval("Des")%>
							</p></dl>
					</li>
					<li>
						<dl>
							<dt>【产品特色】</dt>
							<dd><p>
							<%# Eval("Feature")%>
							</p></dd>
						</dl>
					</li>
				</ul>
			</div>
			<div class="clear"></div>
		</div>
		<div class="l_bot3"></div>
		<div class="blank25"></div>
		<!-- 产品详情开始-->
		<div class="l_top4"></div>
		<div class="l_area4">
			<div class="l_area2_l">
				<h3><img src="../app_themes/ftuan/images/cpxq.gif" alt="产品详情" /></h3>
                    <p><%# Eval("ProductInfo") %></p>
		<h3><img src="../app_themes/ftuan/images/wys.gif" alt="网友说" /></h3>
		<ul class="l_area2_l_mid"><li><%# Eval("NetComment") %></li></ul>				<h3 class="ftgd"><img src="../app_themes/ftuan/images/ftgd.gif" /></h3>
				<ul class="l_area2_l_bot">
					<li><p><%# Eval("WeComment") %></p></li>
					<li class="l_area2_l_bot_bot">请在<em><img src="../app_themes/ftuan/images/sina.gif" /></em><a href="http://t.sina.com.cn/i/1735491121" target="_blank" class="text2">新浪微博</a><em class="text6">5151团每日折扣</em>关注我们，及其它:<em>
					<a href="#" target="_blank"><img src="../app_themes/ftuan/images/dou.gif" /></a></em><em>
					<a href="#" target="_blank"><img src="../app_themes/ftuan/images/kai.gif" /></a></em><em>
					<a href="#" target="_blank"><img src="../app_themes/ftuan/images/ren.gif" /></em></a></li>
				</ul>
			</div>
			<div class="l_area2_r">
								<h2 class="text2"><a href="#" target="_blank"><%# Eval("OwnerName") %></a></h2>
								<p><%# Eval("Contact").ToString().Replace("OBJECTS", "object")%></p>
            <ul class="l_area2_r_bot" style="display:none">
			    <li class="video">
			  <objects type="application/x-shockwave-flash" data="http://5151feel.com/flash/player.swf" autostart="true" width="273" height="283">
		  	<param name="movie" value="http://5151feel.com/flash/player.swf" /><param name="allowfullscreen" value="true" />
		  	<param name="allowscriptaccess" value="always" />
		  	<param name="flashvars" value="file=http://5151feel.com/Upload/Tv/2009/11/24/MyVideo/有腥气11.flv&autostart=0&image=http://5151feel.com/Upload/Image/2009/11/24/111(1).jpg" />
        <embed src="http://5151feel.com/flash/player_5151.swf?file=http://5151feel.com/Upload/Tv/2009/11/24/MyVideo/有腥气11.flv&autostart=0&image=http://5151feel.com/Upload/Image/2009/11/24/111(1).jpg" allowFullScreen="true" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="273" height="283"></embed></object>
</li>
<li class="text6"><a href="http://www.5151feel.com" target="_blank">此视频由5151feel.com提供</a>&gt;&gt;&gt;</li>
</ul>
			</div>
		</div>
		<div class="l_bot4"></div>
		<!-- 产品详情结束 -->
	</div>
	<div class="main_r"><%--
	<a id="A13" href="../Shared/register.aspx"><img src="/Content/Images/tianya.gif" /></a>--%>			
	<a id="A1" href="http://nanjing.5151tuan.com"><img src="/Content/Images/nanjing.gif" /></a>
			<div class="news">
			<div class="ttl"><h2 class="tb1">邀请有礼</h2></div>
			<div class="cnt"><p class="tt1">每邀请一位好友首次注册并购买，您将获￥10元M币! </p><br />
				<strong>&gt;&gt;  <a href='/Shared/invite.aspx?key=<%# Eval("ProductID") %>' target="_blank" >点击获取您的专用邀请链接</a></strong>

			</div>
			<div class="rd"></div>
		</div>
		
		<img src="/Content/Images/popoleft.gif" style="margin-top:10px" />
				<div class="news">
			<div class="ttl1"><h2>有问必答</h2></div>
			<div class="cnt">
				<%# string.IsNullOrEmpty(Question1) ? "" : "<p>问："%><span><a href='/pages/Comment/SingleShow.aspx?pid=<%# Eval("ProductID") %>'><%= Question1 %></a></span>
				<%# string.IsNullOrEmpty(Answer1) ? "" : "<p>答："%><%= Answer1 %> 
				<%# string.IsNullOrEmpty(Question2) ? "" : "<p>问："%><span><a href=/pages/Comment/SingleShow.aspx?pid=<%# Eval("ProductID") %>><%= Question2 %></a></span>
				<%# string.IsNullOrEmpty(Question3)? "":"<p>问：" %><span><a href=/pages/Comment/SingleShow.aspx?pid=<%# Eval("ProductID") %>><%= Question3 %></a></span>
				<p style="padding-top:10px; text-align:center; font-weight:bold">
				<a href="#"><a href='/pages/Comment/SingleShow.aspx?pid=<%# Eval("ProductID") %>#status'>我要提问</a> | <a href='/pages/Comment/SingleShow.aspx?pid=<%# Eval("ProductID") %>'>查看更多</a>(<%= Question_total %><!--29条-->)</p>
				<div class="kf">
				<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=3ef77081563dcb2fd1201e1ce936529cde03f2024078e142cda05b3793d205ba"; target=_blank;onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=3ef77081563dcb2fd1201e1ce936529cde03f2024078e142cda05b3793d205ba';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='/app_themes/ftuan/images/qqkf.gif' alt="Q_5151团"></a>
				<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=5151团&site=cntaobao&s=1&charset=utf-8" ><img border="0" src="/app_themes/ftuan/images/wwkf.gif" alt="5151团客服" /></a>
				
				<%--<a href="msnim:chat?contact=service@5151tuan.com"><img src="/app_themes/ftuan/images/msnkf.gif" alt="MSN客服" /></a>
				--%><br />热线：4006-5151-75 <br />客服时间 周一至周日 9:00-18:00 
				
				</div>
			</div>
			<div class="rd"></div>
		</div>
		
            <div class="news">
			<div class="ttl"><h2 class="tb2">最新通知</h2></div>
			<div class="cnt">
				<ul>
				<li> <a  href="http://guangzhou5151tuan.com/">广州站</a>，<a  href="http://hangzhou.5151tuan.com/">杭州站</a>，<a  href="http://guiyang.5151tuan.com/">贵阳站</a>正在热购</li>
			    <li> <a  href="http://nanjing.5151tuan.com">南京站</a>心动体验</li>

			    <li>6月6日 珠海站、深圳站同时上线，期待与您一起演绎双城故事</li>
				<li>成都站、北京站、上海站、长沙站，厦门站即将上线</li>
				<li>5151 趣味，优质，即将全面升级</li>
				</ul>
			</div>
			<div class="rd"></div>
		</div>

		
	
		<div class="news">
			<div class="ttl"><h2 class="tb3">官方群组</h2></div>
			<div class="cnt">
				<p class="tt2">74889460<span style="cursor:pointer; font-size:10px; margin-left:12px" onclick="copy_QQ('74889460')" title="点击复制QQ群号码" >点击复制</span></p>
		<p class="tt2">100650179 <span style="cursor:pointer; font-size:10px" onclick="copy_QQ('100650179')" title="点击复制QQ群号码" >点击复制</span></p>
		
			</div>
		
			
			<div class="rd"></div>
		</div>
		<%--
			<div style='<%= (Pan.Sys_Config.GetCurrentCityName()=="广州")?"display:block":"display:none" %>' >
        <div class="news">
			<div class="ttl"><h2>今日其他团购</h2></div>
			<div class="cnt">
				<ul>
				<li><a href="/pages/index.aspx?pid=27">仅99元！原价450元的资深发型师洗剪吹造型+深层营养护理套餐，或者原价350元的资深洗剪吹造型+电刘海+电睫毛套餐。来自韩国紫香亭美容美发沙龙！<br />
				<img src="http://www.5151tuan.com/UploadFile/Image/2010/5/26/默认图片副本.jpg" width="180" /></a></li>
				</ul>
			</div>
			<div class="rd"></div>
		</div>
</div>--%>

		
<div style='<%= (Pan.Sys_Config.GetCurrentCityName()=="广州")?"display:block":"display:none" %>' >
        <div class="news">
			<div class="ttl"><h2>广州大学城 特卖专栏</h2></div>
			<div class="cnt">
				<ul>
				<li><a href="/pages/index.aspx?pid=28">仅128元！原价238元的仙踪林闪耀二人套餐。让你在舒适仙踪林里面，从中午吃到晚上。或者从日落吃到月升，尽享一段满足又温馨浪漫的时光。<br />
				<img src="http://www.5151tuan.com/UploadFile/Image/2010/5/27/默认图片副本.jpg" width="180" /></a></li>
				</ul>
			</div>
			<div class="rd"></div>
		</div>
</div>
<div style='<%= (Pan.Sys_Config.GetCurrentCityName()=="贵阳")?"display:block":"display:none" %>' >
        <div class="news">
			<div class="ttl"><h2>贵州大学 特卖专栏</h2></div>
			<div class="cnt">
				<ul>
				<li><a href="/pages/index.aspx?pid=16">仅5元！原价15元的洗、剪、吹服务此时您只需注册立即可以免费享受！建议大家在下午时段过去，那时人少些不用排队。<br />
				<img src="http://guiyang.5151tuan.com/UploadFile/Image/2010/5/17/默认图片副本(1).jpg" width="180" /></a></li>
				</ul>
			</div>
			<div class="rd"></div>
		</div>
</div>


		
		<div class="news">
			<div class="ttl"><h2 class="tb4">邮件订阅</h2></div>
			<div class="cnt">
				<p class="tt3">
					想知道明天买什么？<br /><input type="text" class="index_input12" id="headermail" value="输入您的Email" onclick="this.value=''" />
					<br /><input type="button" class="index_but7" value="   " onclick="headercheck()" />
				</p>
			</div>
			<div class="rd"></div>
		</div>
		<div class="news">
			<div class="ttl"><h2 class="tb5">团购商家申请</h2></div>
			<div class="cnt">
			<p style="text-align:left; padding:0 0 5px 0;">
			<img src="/app_themes/ftuan/images/tgsq.gif" style="float:left; margin-right:5px;"/>如果您有够酷够棒的产品或服务，<b><a href="/pages/html/gkjy.aspx" target="_blank">
			请与我们联系</a></b>。
			</p>
			</div>
			<div class="rd"></div>
		</div>
		
		<%--<div class="index_r_area">
		<ul class="index_r_two">
				<li class="index_r_two_qq">群：100650179</li>
			</ul>
		</div>--%>
		<!--
		<div class="index_r_area">
			<h3 title="团购商家申请"><img src="../app_themes/ftuan/images/r_nav2.gif" alt="团购商家申请" /></h3>
			<ul class="index_r_three">
				<li class="index_r_three_top"><img src="../app_themes/ftuan/images/tgsq.gif" />如果您有够酷够棒的产品或服务，<b><a href="/pages/html/gkjy.aspx" target="_blank">请与我们联系</a></b>。</li>
			</ul>
		</div>

		<div class="blank15"></div>

		
		<div class="blank15"></div>
				<div class="index_r_area">
			<h3 title="消费调查"><img src="../app_themes/ftuan/images/r_nav4.gif" alt="消费调查" /></h3>
			<ul class="index_r_one">
				<li><em>请问，您是美女，还是帅哥？（单选）<input type="hidden" id="hidden" value="15" /></em></li>
																				<li><input id="radio" name="radio" type="radio" value="86" />偶是美女</li>
																<li><input id="radio" name="radio" type="radio" value="87" />俺是帅哥</li>
																<li><input id="radio" name="radio" type="radio" value="88" />你猜猜看</li>
										<li class="index_r_one_but"><a href="/see/vote/result/15" target="_blank"><img src="../app_themes/ftuan/images/but1.gif" /></a>　　　<input name="button2" class="index_but3" type="button" value="  " onclick="vote_radio();"/></li>
						</ul>			
		</div>
		<div class="index_r_bg4"></div>		-->
	</div>
	<DIV class="go-top"><A href="#uptop">↑顶部</A></DIV>
</div>
<script language="JavaScript">
    var s1 ='<%# Eval("EndDate") %>';
    var d1 = new Date(Date.parse(s1.replace(/-/g, "/")));
    var NowTime = new Date();
    var EndTime = new Date(d1);
    var countdown;
    function GetRTime() {
        NowTime = new Date();
        var nMS = EndTime.getTime() - NowTime.getTime() + 24*3600*1000;
        var nD = Math.floor(nMS / (1000 * 60 * 60 * 24)) * 24;
        var nH = Math.floor(nMS / (1000 * 60 * 60)) % 24 + nD;
        var nM = Math.floor(nMS / (1000 * 60)) % 60;
        var nS = Math.floor(nMS / 1000) % 60;
        var nMS = Math.floor(nMS / 100) % 10;
        if (nD >= 0) {
            //document.getElementById("RemainD").innerHTML=nD;
            document.getElementById("RemainH").innerHTML = nH;
            document.getElementById("RemainM").innerHTML = nM;
            document.getElementById("RemainS").innerHTML = nS;
        }
        else {
            //document.getElementById("CountMsg").innerHTML="<dt>已过期！</dt>";
            document.getElementById("RemainH").innerHTML = 0;
            document.getElementById("RemainM").innerHTML = 0;
            document.getElementById("RemainS").innerHTML = 0;
        }
      countdown = setTimeout("GetRTime()", 100);
    }
    $(document).ready(function() {
        GetRTime();
    });

</script>
            </ItemTemplate>
        </asp:TemplateField>
    </Fields>
</asp:DetailsView>

<!--第一部分结束-->
<!--主体部分结束-->
<!-- JiaThis Button BEGIN -->
<script type="text/javascript" src="http://www.jiathis.com/code/jiathis_r.js?btn=r5.gif" charset=utf-8></script>
<!-- JiaThis Button END -->

<%--<script src="http://woocall.sina.com.cn/rls/utf8/stable.js" type="text/javascript"></script>--%>

</asp:Content>

